package a.j;

import a.c.z;
import a.d.o;
import a.d.s;
import a.d.t;
import a.d.w;
import a.f.hc;
import a.f.xc;
import a.f.yc;
import a.f.zc;

import java.util.ArrayList;
import java.util.List;

public class se
  implements yc
{
  public static final int a = 0;
  public static final int b = 1;
  public static final int c = 2;
  public static final int d = 3;
  public static final int e = 4;
  public static final int f = 5;
  public static final int g = 6;
  public static final int h = 7;
  public static final int i = 8;
  public static final int j = 9;
  public static final int k = 10;
  public static final int l = 11;
  public static final int m = 12;
  public static final int n = 13;
  public static final int o = 14;
  public static final int p = 15;
  public static final int q = 16;
  public static final int r = 0;
  public static final int s = 1;
  public static final int t = 2;
  public static final int u = 3;
  public static final int v = 4;
  public static final int w = 5;
  public static final int x = 6;
  public static final int y = 7;
  private double z;
  public static boolean A;
  
  public se()
  {
    this(4.0D);
  }
  
  public se(double paramDouble)
  {
    this.z = paramDouble;
  }
  
  public o a(s params, zc paramzc, Object paramObject)
  {
    a_ locala_ = (a_)paramObject;
    o localo = new o(new w(0.0D, 0.0D), params);
    localo.c(locala_.g(), locala_.h());
    t localt = localo.a();
    double d1 = localt.b();
    double d2 = localt.c();
    double d3 = paramzc.a() + paramzc.c() * 0.5D + paramzc.c() * locala_.a - locala_.d * d1 + locala_.f;
    d3 -= d1 * 0.5D;
    double d4 = paramzc.b() + paramzc.d() * 0.5D + paramzc.d() * locala_.b - locala_.e * d2 + locala_.g;
    d4 -= d2 * 0.5D;
    localo.g(d3 + d1 * 0.5D, d4 + d2 * 0.5D);
    return localo;
  }
  
  public z a(xc paramxc, zc paramzc)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    z localz = new z();
    o localo1 = paramxc.d();
    s locals = localo1.f();
    List localList = a(localo1.i(), localo1.j());
    int i1 = 0;
    do
    {
      if (i1 >= localList.size()) {
        break;
      }
      a_ locala_ = (a_)localList.get(i1);
      o localo2 = a(locals, paramzc, locala_);
      if (!bool2)
      {
        if (bool1) {
          break label126;
        }
        localz.add(new hc(localo2, locala_, paramxc, false));
        i1++;
      }
    } while (!bool1);
    label126:
    return localz;
  }
  
  public Object a(o paramo, zc paramzc)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {
      if (re.a(paramo)) {
        throw new IllegalArgumentException("Invalid label bounds: " + paramo);
      }
    }
    t localt1 = paramo.a();
    t localt2 = new t(paramzc.a(), paramzc.b(), paramzc.c(), paramzc.d());
    double d4 = localt1.d();
    double d5 = localt1.b();
    double d6 = localt2.d();
    double d7 = localt2.b();
    if (!bool2) {
      if (d4 + d5 < d6)
      {
        d1 = 0.5D;
        d2 = -0.5D;
        d3 = d4 + d5 - d6;
        if ((!bool2) && (!bool1)) {
          break label660;
        }
      }
    }
    if (!bool2) {
      if (d4 > d6 + d7)
      {
        d1 = -0.5D;
        d2 = 0.5D;
        d3 = d4 - (d6 + d7);
        if ((!bool2) && (!bool1)) {
          break label660;
        }
      }
    }
    if (!bool2) {
      if (d4 < d6)
      {
        if (bool2) {
          break label282;
        }
        if (d4 + d5 > d6 + d7)
        {
          d1 = 0.0D;
          d2 = (d4 + d5 * (0.5D + d1) - d6) / d7 - 0.5D;
          d3 = 0.0D;
          if ((!bool2) && (!bool1)) {
            break label660;
          }
        }
      }
    }
    label282:
    if (!bool2) {
      if (d4 < d6)
      {
        d1 = (d6 - d4) / d5 - 0.5D;
        d2 = -0.5D;
        d3 = 0.0D;
        if ((!bool2) && (!bool1)) {
          break label660;
        }
      }
    }
    if (!bool2) {
      if (d4 + d5 > d6 + d7)
      {
        d1 = (d6 + d7 - d4) / d5 - 0.5D;
        d2 = 0.5D;
        d3 = 0.0D;
        if ((!bool2) && (!bool1)) {
          break label660;
        }
      }
    }
    if (!bool2) {}
    int i1 = d4 < d6 + d7 * 0.33D ? 1 : 0;
    if (!bool2) {}
    int i2 = d4 + d5 > d6 + d7 * 0.66D ? 1 : 0;
    if ((bool2) || ((i1 == 0) || ((bool2) || (i2 != 0))))
    {
      if (bool2) {
        break label483;
      }
      if (d4 != d6) {}
    }
    else
    {
      d1 = -0.5D;
      if ((!bool2) && (!bool1)) {
        break label538;
      }
    }
    label483:
    if (!bool2) {
      if (i2 != 0)
      {
        if (!bool2) {
          if (i1 == 0) {
            break label520;
          }
        }
      }
      else {
        if (bool2) {
          break label536;
        }
      }
    }
    if (d4 + d5 == d6 + d7)
    {
      label520:
      if (bool2) {
        break label536;
      }
      d1 = 0.5D;
      if (!bool1) {
        break label538;
      }
    }
    label536:
    double d1 = 0.0D;
    label538:
    double d2 = (d4 + d5 * (0.5D + d1) - d6) / d7 - 0.5D;
    if (!bool2) {
      if (d4 - this.z == d6)
      {
        d1 = -0.5D;
        d2 = -0.5D;
        d3 = this.z;
        if (!bool2) {
          if (!bool1) {
            break label660;
          }
        }
      }
      else
      {
        if (bool2) {
          break label658;
        }
      }
    }
    if (d4 + d5 + this.z == d6 + d7)
    {
      d1 = 0.5D;
      d2 = 0.5D;
      if (bool2) {
        break label658;
      }
      d3 = -this.z;
      if (!bool1) {
        break label660;
      }
    }
    label658:
    double d3 = 0.0D;
    label660:
    double d11 = localt1.e();
    double d12 = localt1.c();
    double d13 = localt2.e();
    double d14 = localt2.c();
    if (!bool2) {
      if (d11 + d12 < d13)
      {
        d8 = 0.5D;
        d9 = -0.5D;
        d10 = d11 + d12 - d13;
        if ((!bool2) && (!bool1)) {
          break label1233;
        }
      }
    }
    if (!bool2) {
      if (d11 > d13 + d14)
      {
        d8 = -0.5D;
        d9 = 0.5D;
        d10 = d11 - (d13 + d14);
        if ((!bool2) && (!bool1)) {
          break label1233;
        }
      }
    }
    if (!bool2) {
      if (d11 < d13)
      {
        if (bool2) {
          break label855;
        }
        if (d11 + d12 > d13 + d14)
        {
          d8 = 0.0D;
          d9 = (d11 + d12 * (0.5D + d8) - d13) / d14 - 0.5D;
          d10 = 0.0D;
          if ((!bool2) && (!bool1)) {
            break label1233;
          }
        }
      }
    }
    label855:
    if (!bool2) {
      if (d11 < d13)
      {
        d8 = (d13 - d11) / d12 - 0.5D;
        d9 = -0.5D;
        d10 = 0.0D;
        if ((!bool2) && (!bool1)) {
          break label1233;
        }
      }
    }
    if (!bool2) {
      if (d11 + d12 > d13 + d14)
      {
        d8 = (d13 + d14 - d11) / d12 - 0.5D;
        d9 = 0.5D;
        d10 = 0.0D;
        if ((!bool2) && (!bool1)) {
          break label1233;
        }
      }
    }
    if (!bool2) {}
    int i3 = d11 < d13 + d14 * 0.33D ? 1 : 0;
    if (!bool2) {}
    int i4 = d11 + d12 > d13 + d14 * 0.66D ? 1 : 0;
    if ((bool2) || ((i3 == 0) || ((bool2) || (i4 != 0))))
    {
      if (bool2) {
        break label1056;
      }
      if (d11 != d13) {}
    }
    else
    {
      d8 = -0.5D;
      if ((!bool2) && (!bool1)) {
        break label1111;
      }
    }
    label1056:
    if (!bool2) {
      if (i4 != 0)
      {
        if (!bool2) {
          if (i3 == 0) {
            break label1093;
          }
        }
      }
      else {
        if (bool2) {
          break label1109;
        }
      }
    }
    if (d11 + d12 == d13 + d14)
    {
      label1093:
      if (bool2) {
        break label1109;
      }
      d8 = 0.5D;
      if (!bool1) {
        break label1111;
      }
    }
    label1109:
    double d8 = 0.0D;
    label1111:
    double d9 = (d11 + d12 * (0.5D + d8) - d13) / d14 - 0.5D;
    if (!bool2) {
      if (d11 - this.z == d13)
      {
        d8 = -0.5D;
        d9 = -0.5D;
        d10 = this.z;
        if (!bool2) {
          if (!bool1) {
            break label1233;
          }
        }
      }
      else
      {
        if (bool2) {
          break label1231;
        }
      }
    }
    if (d11 + d12 + this.z == d13 + d14)
    {
      d8 = 0.5D;
      d9 = 0.5D;
      if (bool2) {
        break label1231;
      }
      d10 = -this.z;
      if (!bool1) {
        break label1233;
      }
    }
    label1231:
    double d10 = 0.0D;
    label1233:
    return new a_(d2, d9, d1, d8, d3, d10, paramo.i(), paramo.j());
  }
  
  public double b()
  {
    return this.z;
  }
  
  public void a(double paramDouble)
  {
    this.z = paramDouble;
  }
  
  private List a(double paramDouble1, double paramDouble2)
  {
    ArrayList localArrayList = new ArrayList();
    localArrayList.add(new a_(0.0D, -0.5D, 0.0D, 0.5D, 0.0D, -this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(-0.5D, -0.5D, 0.5D, 0.5D, -this.z, -this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(0.5D, -0.5D, -0.5D, 0.5D, this.z, -this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(0.5D, 0.0D, -0.5D, 0.0D, this.z, 0.0D, paramDouble1, paramDouble2));
    localArrayList.add(new a_(-0.5D, 0.0D, 0.5D, 0.0D, -this.z, 0.0D, paramDouble1, paramDouble2));
    localArrayList.add(new a_(0.0D, 0.5D, 0.0D, -0.5D, 0.0D, this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(-0.5D, 0.5D, 0.5D, -0.5D, -this.z, this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(0.5D, 0.5D, -0.5D, -0.5D, this.z, this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, paramDouble1, paramDouble2));
    localArrayList.add(new a_(0.0D, 0.5D, 0.0D, 0.5D, 0.0D, -this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(0.0D, -0.5D, 0.0D, -0.5D, 0.0D, this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(-0.5D, 0.0D, -0.5D, 0.0D, this.z, 0.0D, paramDouble1, paramDouble2));
    localArrayList.add(new a_(0.5D, 0.0D, 0.5D, 0.0D, -this.z, 0.0D, paramDouble1, paramDouble2));
    localArrayList.add(new a_(-0.5D, -0.5D, -0.5D, -0.5D, this.z, this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(0.5D, -0.5D, 0.5D, -0.5D, -this.z, this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(-0.5D, 0.5D, -0.5D, 0.5D, this.z, -this.z, paramDouble1, paramDouble2));
    localArrayList.add(new a_(0.5D, 0.5D, 0.5D, 0.5D, -this.z, -this.z, paramDouble1, paramDouble2));
    return localArrayList;
  }
  
  public Object a()
  {
    return new a_(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, -1.0D);
  }
  
  public Object a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6, double paramDouble7, double paramDouble8)
  {
    return new a_(paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble5, paramDouble6, paramDouble7, paramDouble8);
  }
  
  public Object a(int paramInt)
  {
    return a(paramInt, 0.0D, -1.0D);
  }
  
  private Object a(int paramInt, double paramDouble1, double paramDouble2)
  {
    switch (paramInt)
    {
    case 1: 
      return new a_(-0.5D, 0.0D, -0.5D, 0.0D, this.z, 0.0D, paramDouble1, paramDouble2);
    case 2: 
      return new a_(0.5D, 0.0D, 0.5D, 0.0D, -this.z, 0.0D, paramDouble1, paramDouble2);
    case 3: 
      return new a_(0.0D, -0.5D, 0.0D, -0.5D, 0.0D, this.z, paramDouble1, paramDouble2);
    case 4: 
      return new a_(-0.5D, -0.5D, -0.5D, -0.5D, this.z, this.z, paramDouble1, paramDouble2);
    case 5: 
      return new a_(0.5D, -0.5D, 0.5D, -0.5D, -this.z, this.z, paramDouble1, paramDouble2);
    case 6: 
      return new a_(0.0D, 0.5D, 0.0D, 0.5D, 0.0D, -this.z, paramDouble1, paramDouble2);
    case 7: 
      return new a_(-0.5D, 0.5D, -0.5D, 0.5D, this.z, -this.z, paramDouble1, paramDouble2);
    case 8: 
      return new a_(0.5D, 0.5D, 0.5D, 0.5D, -this.z, -this.z, paramDouble1, paramDouble2);
    case 0: 
      return new a_(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, paramDouble1, paramDouble2);
    case 10: 
      return new a_(-0.5D, 0.0D, 0.5D, 0.0D, -this.z, 0.0D, paramDouble1, paramDouble2);
    case 9: 
      return new a_(0.5D, 0.0D, -0.5D, 0.0D, this.z, 0.0D, paramDouble1, paramDouble2);
    case 11: 
      return new a_(0.0D, -0.5D, 0.0D, 0.5D, 0.0D, -this.z, paramDouble1, paramDouble2);
    case 13: 
      return new a_(-0.5D, -0.5D, 0.5D, 0.5D, -this.z, -this.z, paramDouble1, paramDouble2);
    case 12: 
      return new a_(0.5D, -0.5D, -0.5D, 0.5D, this.z, -this.z, paramDouble1, paramDouble2);
    case 14: 
      return new a_(0.0D, 0.5D, 0.0D, -0.5D, 0.0D, this.z, paramDouble1, paramDouble2);
    case 16: 
      return new a_(-0.5D, 0.5D, 0.5D, -0.5D, -this.z, this.z, paramDouble1, paramDouble2);
    case 15: 
      return new a_(0.5D, 0.5D, -0.5D, -0.5D, this.z, this.z, paramDouble1, paramDouble2);
    }
    return new a_(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, paramDouble1, paramDouble2);
  }
  
  public Object a(o paramo, zc paramzc, int paramInt)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    a_ locala_ = (a_)a(paramo, paramzc);
    t localt = paramo.a();
    double d7 = localt.d();
    double d8 = d7 + localt.b();
    double d9 = paramzc.a();
    double d10 = paramzc.a() + paramzc.c();
    double d1;
    double d3;
    if (((bool2) || (paramInt != 2)) && ((bool2) || (paramInt != 4)))
    {
      if (bool2) {
        break label205;
      }
      if (paramInt != 6) {}
    }
    else
    {
      d1 = -0.5D;
      if (!bool2) {
        if (d8 < d9)
        {
          d3 = 0.5D;
          d5 = d8 - d9;
          if (!bool2) {
            if (!bool1) {
              break label355;
            }
          }
        }
        else
        {
          if (bool2) {
            break label187;
          }
        }
      }
      if (d7 > d9)
      {
        d3 = -0.5D;
        d5 = d7 - d9;
        if (!bool2) {
          if (!bool1) {
            break label355;
          }
        }
      }
      else
      {
        label187:
        d3 = (d9 - d7) / localt.b() - 0.5D;
        d5 = 0.0D;
      }
      if ((!bool2) && (!bool1)) {
        break label355;
      }
    }
    label205:
    if (((!bool2) && (paramInt == 3)) || ((bool2) || ((paramInt == 5) || (paramInt == 7))))
    {
      d1 = 0.5D;
      if (!bool2) {
        if (d8 < d10)
        {
          d3 = 0.5D;
          d5 = d8 - d10;
          if (!bool2) {
            if (!bool1) {
              break label355;
            }
          }
        }
        else
        {
          if (bool2) {
            break label318;
          }
        }
      }
      if (d7 > d10)
      {
        d3 = -0.5D;
        d5 = d7 - d10;
        if (!bool2) {
          if (!bool1) {
            break label355;
          }
        }
      }
      else
      {
        d3 = (d10 - d7) / localt.b() - 0.5D;
        d5 = 0.0D;
        if (bool2) {
          break label348;
        }
      }
      if (!bool1) {
        break label355;
      }
    }
    else
    {
      d1 = locala_.a();
      d3 = locala_.c();
    }
    label318:
    label348:
    double d5 = locala_.e();
    label355:
    double d11 = localt.e();
    double d12 = localt.e() + localt.c();
    double d13 = paramzc.b();
    double d14 = paramzc.b() + paramzc.d();
    double d2;
    double d4;
    if (((bool2) || (paramInt != 0)) && ((bool2) || (paramInt != 4)))
    {
      if (bool2) {
        break label534;
      }
      if (paramInt != 5) {}
    }
    else
    {
      d2 = -0.5D;
      if (!bool2) {
        if (d12 < d13)
        {
          d4 = 0.5D;
          d6 = d12 - d13;
          if (!bool2) {
            if (!bool1) {
              break label685;
            }
          }
        }
        else
        {
          if (bool2) {
            break label516;
          }
        }
      }
      if (d11 > d13)
      {
        d4 = -0.5D;
        d6 = d11 - d13;
        if (!bool2) {
          if (!bool1) {
            break label685;
          }
        }
      }
      else
      {
        label516:
        d4 = (d13 - d11) / localt.c() - 0.5D;
        d6 = 0.0D;
      }
      if ((!bool2) && (!bool1)) {
        break label685;
      }
    }
    label534:
    if (((!bool2) && (paramInt == 1)) || ((bool2) || ((paramInt == 6) || (paramInt == 7))))
    {
      d2 = 0.5D;
      if (!bool2) {
        if (d12 < d14)
        {
          d4 = 0.5D;
          d6 = d12 - d14;
          if (!bool2) {
            if (!bool1) {
              break label685;
            }
          }
        }
        else
        {
          if (bool2) {
            break label648;
          }
        }
      }
      if (d11 > d14)
      {
        d4 = -0.5D;
        d6 = d11 - d14;
        if (!bool2) {
          if (!bool1) {
            break label685;
          }
        }
      }
      else
      {
        d4 = (d14 - d11) / localt.c() - 0.5D;
        d6 = 0.0D;
        if (bool2) {
          break label678;
        }
      }
      if (!bool1) {
        break label685;
      }
    }
    else
    {
      d2 = locala_.b();
      d4 = locala_.d();
    }
    label648:
    label678:
    double d6 = locala_.f();
    label685:
    return new a_(d1, d2, d3, d4, d5, d6, paramo.i(), paramo.j());
  }
  
  public static final class a_
  {
    double a;
    double b;
    double d;
    double e;
    double f;
    double g;
    double h;
    double i;
    public static boolean j;
    
    public a_(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6, double paramDouble7, double paramDouble8)
    {
      this.a = paramDouble1;
      this.b = paramDouble2;
      this.d = paramDouble3;
      this.e = paramDouble4;
      this.f = paramDouble5;
      this.g = paramDouble6;
      this.h = paramDouble7;
      this.i = paramDouble8;
    }
    
    public double a()
    {
      return this.a;
    }
    
    public double b()
    {
      return this.b;
    }
    
    public double c()
    {
      return this.d;
    }
    
    public double d()
    {
      return this.e;
    }
    
    public double e()
    {
      return this.f;
    }
    
    public double f()
    {
      return this.g;
    }
    
    public double g()
    {
      return this.h;
    }
    
    public double h()
    {
      return this.i;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.se

 * JD-Core Version:    0.7.0.1

 */